package com.kevin.cloud.serviceribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author: Kevin
 * @Date: 2017/12/18
 * @Modified By:
 */
@RestController
public class HelloController {

    @Autowired
    HelloService helloService;

    //@Autowired
    //RestTemplate restTemplate;

    @RequestMapping(value = "/hi")
    public String hi(@RequestParam String name){

        return helloService.hiService(name);
        //return restTemplate.getForObject("http://SERVICE-HI/hi?name="+name,String.class);
    }
}
